public class Cishu {
    public static void main(String[] args) {
        int ret = 0;
        for (int i = 1; i <= 100; i++) {
            ret += ciShu(i);
        }
        System.out.println(ret);
    }

    public static int ciShu(int number){
        int count = 0;
        while(number > 0){
            if(number % 10 == 9){
                count++;
            }
            number = number / 10;
        }
        return count;
    }
}
